package test1;

public class Master extends Pet {
    private String name;
    private String mac;

    public Master(String pet, String person, String name, String mac) {
        super(pet, person);
        this.name = name;
        this.mac = mac;
    }

    public String info() {
        return super.info() + "，名字：" + name + "，注射：" + mac;
    }

    public static void main(String[] args) {
        Master tai = new Master("猫", "lisi", "小白", "阿莫西林");
        Master ta = new Master("狗", "zhangsan", "小黄", "麻醉剂");
        System.out.println(tai.info());
        System.out.println(ta.info());
    }
}
class Pet {
    private String pet;

    private String person;

    public Pet(String pet, String person) {

        this.person = person;
        this.pet = pet;

    }

    public String info() {
        return "种类：" + pet + "，主人：" + person;
    }
}
